{include file="Index/header" /}
 
<body>
<div class="formbody">
<div class="formtitle"><span>文章分类列表</span></div> 
	 

	<table class="tablelist" >
		<thead>
			<tr>
				<th>编号</th>
				<th>分类名称</th>   
				
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		 	{volist name="listArr" id="vo" key="k" } 
		 		<tr>
					<td>{$vo.id}</td>
				
					<td ><b>{$vo.title}</b></td>  
					
					<td> 
						<a href="{:url('Article/categoryAdd', array('aid'=>$vo[id]))}" class="tablelink">编辑</a>
						<a href="javascript:void(0);" data="{:url('Article/categorydelete', array('aid'=>$vo[id]))}" onclick="deleteTop(this);" class="tablelink">删除</a>
					</td> 
				 
				</tr>
		 		{volist name="sonList[$vo['id']]" id="vo" key="k" } 
				<tr>
					<td>{$vo.id}</td>
				
					<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;┣{$vo.title}</td>  
					
					<td> 
						<a href="{:url('Article/categoryAdd', array('aid'=>$vo[id]))}" class="tablelink">编辑</a>
						<a href="{:url('Article/categorydelete', array('aid'=>$vo[id]))}" class="tablelink">删除</a>
					</td> 
				 
				</tr>
				{/volist}
				
		 	{/volist}
		</tbody>
	</table>
	<div class="page">
					{$pages}
	</div>
 
</div>

<script>


/* 删除 */
function deleteTop(obj){
	art.dialog({
	    content: '删除顶级分类，分类对应的子分类也会被删除?',
	    ok: function () {
	    	location.href=$(obj).attr("data");
	    },
	    okVal: '确定',
	    cancelVal: '取消'
	});
	
}

</script>


{include file="Index/footer" /}